﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;
using DTO;
using DAO;

namespace WebForm_HocSinh
{
    public partial class index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            gvHocSinh.DataSource = HocSinhBUS.ListHocSinhAll();
            gvHocSinh.DataBind();
        }

        protected void btnInsertHocSinh_Click(object sender, EventArgs e)
        {
            HocSinhDTO hsDTO = new HocSinhDTO();
            hsDTO.TenHocSinh = txtTenHocSinh.Text;
            HocSinhBUS.InserHocSinh(hsDTO);

            gvHocSinh.DataBind();
        }
    }
}